<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:79:"/webHome/host6366235/www/public/../application/teacher/view/my/studentinfo.html";i:1679841583;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title><?php echo $setting['webname']; ?>-报名信息</title>
  <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link type="text/css" rel="stylesheet" href="/public/static/home/themes/css/base.css">
    <!--<link type="text/css" rel="stylesheet" href="/public/static/home/themes/css/home.css">-->
    <link href="/public/static/admin/layui/css/layui.css" rel="stylesheet">
    <link rel="stylesheet" href="/public/static/home/css/mint-ui.css">
    <link rel="stylesheet" href="/public/static/home/css/common.css">
    <link rel="stylesheet" href="/public/static/home/css/index.css">
    <link rel="stylesheet" href="/public/static/admin/css/font-awesome.css">
    <link rel="shortcut icon" href="/public/static/admin/uploads/set/<?php echo $setting['ico']; ?>">
    <style>
        .tg{
            border:0px;color:#fff;border-radius:3px;background: #23b7e5; font-size:12px;padding:2px 3px;float:right;
        }
        input[type=text]{
            width: 50%;
        }
        .tg:active{
            background: #08700e;
        }
        .mint-popup-head{
          height:50px;
        }
        #save{
            display: none;
        }
        .save_btn{
            border:0px;color:#fff;border-radius:3px;background: #27c24c; font-size:14px;padding:2px 3px;width: 95%;height:35px;line-height: 35px;
        }
    </style>

</head>
<body>

<section class="aui-flexView">
    <header class="aui-navBar aui-navBar-fixed b-line">
        <a href="javascript:history.back(-1)" class="aui-navBar-item">
            <i class="icon icon-return"></i>
        </a>
        <div class="aui-center">
            <span class="aui-center-title"><?php if(!empty($user['name'])): ?><?php echo $user['name']; ?>-报名信息<?php endif; ?></span>
        </div>
        <a href="javascript:;" class="aui-navBar-item">
            <i class="icon icon-sys"></i>
        </a>
    </header>
    <section class="aui-scrollView">
      <div class="vueBox">
            <a href="javascript:;" class="aui-flex b-line">
                <div class="aui-flex-box">
                    <h3>姓名：<?php if(empty($user['name'])): ?><span style='color:#999'>未录入</span><?php else: ?><?php echo $user['name']; endif; ?> (<?php echo $user['id']; ?>)</h3>
                </div>
            </a>
            <a href="javascript:;" class="aui-flex b-line">
                <div class="aui-flex-box">
                    <h3>性别：<?php if($user['sex'] === 1): ?>男<?php elseif($user['sex'] === 0): ?>女<?php else: ?>不詳<?php endif; ?></h3>
                </div>
            </a>
            <a href="javascript:;" class="aui-flex b-line">
                <div class="aui-flex-box">
                    <h3>联系电话：<?php if(empty($user['phone'])): ?><span style='color:#999'>未录入</span><?php else: ?><?php echo $user['phone']; endif; ?></h3>
                </div>
            </a>
            <a href="javascript:;" class="aui-flex b-line">
                <div class="aui-flex-box">
                    <h3>父母联系电话：<?php if(empty($user['parenttel'])): ?><span style='color:#999'>未录入</span><?php else: ?><?php echo $user['parenttel']; endif; ?></h3>
                </div>
            </a>
            <a href="javascript:;" class="aui-flex b-line">
                <div class="aui-flex-box">
                    <h3>身份证号： <?php if(empty($user['idcard'])): ?><span style='color:#999'>未录入</span><?php else: ?><?php echo $user['idcard']; endif; ?></h3>
                </div>
            </a>
            <a href="javascript:;" class="aui-flex b-line">
                <div class="aui-flex-box">
                    <h3>通信地址：<?php if(empty($user['address'])): ?><span style='color:#999'>未录入</span><?php else: ?><?php echo $user['address']; endif; ?></h3>
                </div>
            </a>
            <a href="javascript:;" class="aui-flex b-line">
                <div class="aui-flex-box">
                    <h3>学校名称：<?php if(empty($user['schoolname'])): ?><span style='color:#999'>未录入</span><?php else: ?><?php echo $user['schoolname']; endif; ?></h3>
                </div>
            </a>
            <a href="javascript:;" class="aui-flex b-line">
                <div class="aui-flex-box">
                    <h3>毕业学校所在地：<?php if(empty($user['schooladdress'])): ?><span style='color:#999'>未录入</span><?php else: ?><?php echo $user['schooladdress']; endif; ?></h3>
                </div>
            </a>
            <a href="javascript:;" class="aui-flex b-line">
                <div class="aui-flex-box">
                    <h3>中考（模拟）成绩：<?php if(empty($user['score'])): ?><span style='color:#999'>未录入</span><?php else: ?><?php echo $user['score']; endif; ?></h3>
                </div>
            </a>
            <a href="javascript:;" class="aui-flex b-line">
                <div class="aui-flex-box">
                    <h3>QQ/微信：<?php if(empty($user['qqwx'])): ?><span style='color:#999'>未录入</span><?php else: ?><?php echo $user['qqwx']; endif; ?></h3>
                </div>
            </a>

            <!--报名记录信息-->
            <div class="divHeight"></div>
            <a href="javascript:;" class="aui-flex b-line">
                <div class="aui-flex-box">
                    <h3>年级：<?php if(empty($apply['grade'])): ?><span style='color:#999'>不详</span><?php else: ?><?php echo $apply['grade']; ?>级<?php endif; ?></h3>
                </div>
            </a>
            <a href="javascript:;" class="aui-flex b-line" id="bktype">
                <div class="aui-flex-box">
                    <h3>
                        报考类别：<input type="text" :value="bktype_name"  name="bktype_name"  class="hidenfooter" readonly>
                        <button class="tg" id="change_bktype"  @click="showBktype">选择</button>
                    </h3>
                </div>
            </a>

                <a href="javascript:;" class="aui-flex b-line" id="coursetype">
                  <div class="aui-flex-box">
                      <h3>
                          专业大类：<input type="text" :value="coursetype_name"  name="coursetype_name"  class="hidenfooter" readonly>
                          <button class="tg" id="change_coursetype"  @click="showCoursetype">选择</button>
                      </h3>
                  </div>
                </a>
                <a href="javascript:;" class="aui-flex b-line" id="major1">
                    <div class="aui-flex-box">
                        <h3>
                            专业一：<input type="text" :value="major_name"  name="major"  class="hidenfooter" readonly>
                            <button class="tg" id="change_major"  @click="showMajor">选择</button>
                        </h3>
                    </div>
                </a>
                <a href="javascript:;" class="aui-flex b-line" id="major2">
                    <div class="aui-flex-box">
                        <h3>专业二：<input type="text" :value="major_name2"  name="major"  class="hidenfooter" readonly>
                          <button class="tg" id="change_major2"  @click="showMajor2">选择</button>
                        </h3>
                    </div>
                </a>
                <a href="javascript:;" class="aui-flex b-line" id="isAdjust">
                    <div class="aui-flex-box">
                        <h3>是否服从调剂：<input type="text" :value="isAdjust_name"  name="isadjust"  class="hidenfooter" readonly >
                            <button class="tg" id="showIsAdjust"  @click="showIsAdjust">选择</button>
                        </h3>
                    </div>
                </a>
              <a href="javascript:;" class="aui-flex b-line" id="save">
                  <div class="aui-flex-box">
                      <h3>
                          <button @click="saveChange" class="save_btn">保存选择</button>
                      </h3>
                  </div>
              </a>

            <div class="divHeight"></div>
            <a href="javascript:;" class="aui-flex b-line">
                <div class="aui-flex-box">
                    <h3>报名时间：<?php echo $apply['create_time']; ?></h3>
                </div>
            </a>
            <a href="javascript:;" class="aui-flex b-line">
                <div class="aui-flex-box">
                    <h3>报名状态：
                        <?php if($apply['status']==1): ?>
                        <span style="color:#f8ac59"><i class="fa fa-thumb-tack"></i> 缴费核对中</span>
                        <?php elseif($apply['status']==2): ?>
                        <span style="color:green"><i class="fa fa-check"></i> 已录取</span>
                        <?php elseif($apply['status']==3): ?>
                        <span style="color:#2b57d9;"><i class="fa fa-times"></i> 拒绝</span>
                        <?php elseif($apply['status']==4): ?>
                        <span style="color:#d9534f;"><i class="fa fa-times"></i> 待支付 </span>
                        <?php elseif($apply['status']==5): ?>
                        <span style="color:#f8ac59;"><i class="fa fa-times"></i> 报名审核中 </span>
                        <button class="tg" id="classAddStudent2">通过审核</button>
                        <?php endif; ?>
                    </h3>
                </div>
            </a>
            <?php if($apply['status'] == 3): ?>
            <a href="javascript:;" class="aui-flex b-line">
                <div class="aui-flex-box">
                    <h3>拒绝理由：<?php if(empty($apply['reason'])): ?><span style='color:#999'>无</span><?php else: ?><?php echo $apply['reason']; endif; ?></h3>
                </div>
            </a>
            <?php endif; ?>
            <a href="javascript:;" class="aui-flex b-line">
                <div class="aui-flex-box">
                    <h3>学生备注：<?php if(empty($apply['comment'])): ?><span style='color:#999'>无</span><?php else: ?><?php echo $apply['comment']; endif; ?></h3>
                </div>
            </a>
            <a href="javascript:;" class="aui-flex b-line">
                <div class="aui-flex-box">
                    <h3>老师备注：<?php if(empty($apply['teacher_comment'])): ?><span style='color:#999'>无</span><?php else: ?><?php echo $apply['teacher_comment']; endif; ?></h3>
                </div>
            </a>


            <!--报名记录信息-->
            <div class="divHeight"></div>
            <a href="javascript:;" class="aui-flex b-line">
                <div class="aui-flex-box">
                    <h3>支付方式：<?php if(empty($apply['paytype'])): ?><span style='color:#999'>未支付</span><?php else: ?><?php echo $apply['paytype']; endif; ?></h3>
                </div>
            </a>
            <a href="javascript:;" class="aui-flex b-line">
                <div class="aui-flex-box">
                    <h3>支付账号：<?php if(empty($apply['payid'])): ?><span style='color:#999'>未支付</span><?php else: ?><?php echo $apply['payid']; endif; ?></h3>
                </div>
            </a>
            <a href="javascript:;" class="aui-flex b-line">
                <div class="aui-flex-box">
                    <h3>支付时间：<?php if(empty($apply['pay_time'])): ?><span style='color:#999'>未支付</span><?php else: ?><?php echo date("Y年m月d日 H:i:s",$apply['pay_time']); endif; ?></h3>
                </div>
            </a>

          <!--报考类型-->
          <mt-popup v-model="bktype" position="bottom" >
              <ul class="mint-popup-head">
                  <li @click="selectBktype(0)" class="showfooter">取消</li>
                  <li @click="selectBktype(1)" class="showfooter">确认</li>
              </ul>
              <mt-picker :slots="bktype_list" @change="bktypeChange" value-key="name"> </mt-picker>
          </mt-popup>
       <!--专业大类列表-->
       <mt-popup v-model="coursetypeVisible" position="bottom" >
           <ul class="mint-popup-head">
               <li @click="selectCoursetype(0)" class="showfooter">取消</li>
               <li @click="selectCoursetype(1)" class="showfooter">确认</li>
           </ul>
           <mt-picker :slots="coursetype_list" @change="CoursetypeChange" value-key="name"> </mt-picker>
       </mt-popup>
        <!--专业1列表-->
        <mt-popup v-model="majorVisible" position="bottom" >
          <ul class="mint-popup-head">
            <li @click="selectMajor(0)" class="showfooter">取消</li>
            <li @click="selectMajor(1)" class="showfooter">确认</li>
          </ul>
          <mt-picker :slots="major_list" @change="majorChange" value-key="name"> </mt-picker>
        </mt-popup>
        <!--专业2列表-->
        <mt-popup v-model="majorVisible2" position="bottom" >
          <ul class="mint-popup-head">
            <li @click="selectMajor2(0)" class="showfooter">取消</li>
            <li @click="selectMajor2(1)" class="showfooter">确认</li>
          </ul>
          <mt-picker :slots="major_list2" @change="majorChange2" value-key="name"> </mt-picker>
        </mt-popup>
          <!--是否服从调剂-->
          <mt-popup v-model="isAdjustVisible" position="bottom">
              <ul class="mint-popup-head">
                  <li @click="selectIsAdjust(0)" class="showfooter">取消</li>
                  <li @click="selectIsAdjust(1)" class="showfooter">确认</li>
              </ul>
              <mt-picker :slots="isAdjust_list" @change="isAdjustChange" value-key="name"> </mt-picker>
          </mt-popup>
        </div>

    </section>
</section>



<script src="/public/static/home/js/jquery.min.js"></script>
<script src="/public/static/home/js/vue.min.2.5.13.js"></script>
<!-- 引入组件库 -->
<script src="/public/static/home/js/mint-ui.js"></script>
<script src="/public/static/admin/layui/layui.js"></script>
<script>

  layui.use('upload', function() { //独立版的layer无需执行这一句
    var $ = layui.jquery, layer = layui.layer;


  var vm = new Vue({
    el: ".vueBox",
    data: {
        query:"<?php echo $setting['weburl']; ?>public/index.php/home",
        // query:"http://localhost/public/index.php/home",
        // 报考类型
        bktype:false,
        bktype_temp: '<?php echo $apply['bktype']; ?>', //暂作缓存，取消按钮不赋值给bank_name
        bktype_name: '<?php echo $apply['bktype']; ?>',
        bktype_id_temp:'<?php echo $apply['bktype_id']; ?>',
        bktype_id:'<?php echo $apply['bktype_id']; ?>',
        //专业大类
        coursetypeVisible:false,
        coursetype_name_temp: '<?php echo $apply['coursetype_name']; ?>',
        coursetype_name:'<?php echo $apply['coursetype_name']; ?>',
        coursetype_id_temp:'<?php echo $apply['coursetype_id']; ?>',
        coursetype_id:'<?php echo $apply['coursetype_id']; ?>',
        // 专业1
        majorVisible:false,
        major_temp: '<?php echo $apply['major']; ?>',
        major_name: '<?php echo $apply['major']; ?>',
        major_id:"<?php echo $apply['major_id']; ?>",
        major_id_temp:'<?php echo $apply['major_id']; ?>',
        // 专业2
        majorVisible2:false,
        major_temp2: '<?php echo $apply['major2']; ?>',
        major_name2: '<?php echo $apply['major2']; ?>',
        major2_id:"<?php echo $apply['major2_id']; ?>",
        major2_id_temp:"<?php echo $apply['major2_id']; ?>",
        //专业剩余名额
        major_temp_number:"",
        major_temp2_number:"",
        // 是否符合调剂
        isAdjustVisible:false,
        isAdjust_list:[{
            flex:1,
            values:[
                {id:'1',name:'是'},
                {id:'0',name:'否'},
            ]
        }],
        isAdjust_temp: '<?php echo $apply['isadjust']; ?>', //暂作缓存，取消按钮不赋值给bank_name
        isAdjust_name: '<?php echo $apply['isadjust']; ?>',
    },

    created: function() {
        this.bktype_temp = this.bktype_name_s;
        this.bktype_id_temp = this.bktype_id_s;
    },

    mounted() {},
    methods: {
        //弹出报考类型
        showBktype: function() {
            this.bktype = true
        },
        bktypeChange: function(picker, values) {
            if (picker.getSlotValue(0)) {
                this.bktype_temp = picker.getSlotValue(0).name
                this.bktype_id_temp = picker.getSlotValue(0).id
            }
        },
        selectBktype: function(bool) {
            // bool 判断 触发的是取消还是确认按钮
            this.bktype_name = bool ? this.bktype_temp : this.bktype_name;
            this.bktype_id = bool ? this.bktype_id_temp :this.bktype_id;
            console.log(this.bktype_id);
            //选择报考类型后初始化报考大类
            this.course_temp = this.coursetype_name_s;
            this.course_id_temp = this.coursetype_id_s;
            console.log(this.coursetype_list[0].values.length);
            //判断是否下级如果则不显示
            if(this.coursetype_list[0].values.length == 0){
                $("#coursetype").hide() //隐藏专业大类
                $("#major1").hide() //隐藏专业1
                $("#major2").hide() //隐藏专业2
                $("#isAdjust").hide() //隐藏是否服从调剂
            }else{
                $("#coursetype").show() //隐藏专业大类
                $("#major1").hide() //显示专业1
                $("#major2").hide() //显示专业2
                $("#isAdjust").hide() //显示是否服从调剂
            }
            $("#save").show();
            //清空之前的选项
            this.coursetype_name = '';
            this.coursetype_id = '';
            this.major_name = '';
            this.major_id = '';
            this.major_name2 = '';
            this.major2_id = '';
            this.isAdjust_name = '';
            //关闭弹窗
            this.bktype = false
        },
        //弹出专业大类
        showCoursetype: function() {
            this.coursetypeVisible = true
        },
        CoursetypeChange: function(picker, values) {
            if (picker.getSlotValue(0)) {
                this.Coursetype_temp = picker.getSlotValue(0).name
                this.Coursetype_id_temp = picker.getSlotValue(0).id
            }
        },
        selectCoursetype: function(bool) {
            // bool 判断 触发的是取消还是确认按钮
            this.coursetype_name = bool ? this.Coursetype_temp : this.coursetype_name;
            this.coursetype_id = bool ? this.Coursetype_id_temp :this.coursetype_id;
            //选择专业大类后查询对应的专业
            this.major_temp = this.major_temp_s.name;
            this.major_temp_number = this.major_temp_s.number;

            this.major_temp2 = this.major_temp2_s;
            this.major_temp_number2 = this.major_temp_s.number;

            //判断是否有专业，如果没有转也则隐藏专业
            if(this.major_list[0].values.length == 0){
                $("#major1").hide() //隐藏专业1
                $("#major2").hide() //隐藏专业2
                $("#isAdjust").hide() //隐藏是否服从调剂
            }else{
                //判断如果当前专业大类下只有一个专业的话只显示专业1，专业2不需要显示
                if(this.major_list[0].values.length == 1) {
                    $("#major1").show() //显示专业1
                    $("#major2").hide() //显示专业2
                    $("#isAdjust").hide() //显示是否服从调剂
                }else {
                    $("#major1").show() //显示专业1
                    $("#major2").show() //显示专业2
                    $("#isAdjust").show() //显示是否服从调剂
                }
            }
            $("#save").show();
            //清空专业选择
            this.major_name = '';
            this.major_id = '';
            this.major_name2 = '';
            this.major2_id = '';
            this.isAdjust_name = '';
            //关闭选择窗口
            this.coursetypeVisible = false
        },
        //弹出专业1
        showMajor: function() {
        this.majorVisible = true

      },
        majorChange: function(picker, values) {
            if (picker.getSlotValue(0)) {
                  this.major_temp_number = picker.getSlotValue(0).name.substr(picker.getSlotValue(0).name.indexOf("余")+1,picker.getSlotValue(0).name.indexOf("个")-picker.getSlotValue(0).name.indexOf("余")-1)
                  this.major_temp = picker.getSlotValue(0).name.substr(0,picker.getSlotValue(0).name.indexOf("("))
                  this.major_id_temp = picker.getSlotValue(0).id;
                }
            },
        selectMajor: function(bool) {
            if(this.major_temp_number<=0){
              this.major_name = "";
              this.major_id = "";
              layer.msg("该专业已经没有名额，请选择其它专业。或联系负责老师。",{time:4000,shade:0.5});
            }else {
              // bool 判断 触发的是取消还是确认按钮
              this.major_name = bool ? this.major_temp : this.major_name;
              this.major_id = bool ? this.major_id_temp :this.major_id;
              $("#save").show();
              this.majorVisible = false
            }
        },
        //弹出专业2
        showMajor2: function() {
        this.majorVisible2 = true

      },
        majorChange2: function(picker, values) {
        if (picker.getSlotValue(0)) {
          this.major_temp_number2 = picker.getSlotValue(0).name.substr(picker.getSlotValue(0).name.indexOf("余")+1,picker.getSlotValue(0).name.indexOf("个")-picker.getSlotValue(0).name.indexOf("余")-1)
          this.major_temp2 =  picker.getSlotValue(0).name.substr(0,picker.getSlotValue(0).name.indexOf("("))
          this.major2_id_temp = picker.getSlotValue(0).id;
        }
      },
        selectMajor2: function(bool) {
        // bool 判断 触发的是取消还是确认按钮
        if(this.major_temp_number2<=0){
          this.major_name2 = "";
          this.major2_id = "";
          layer.msg("该专业已经没有名额，请选择其它专业。或联系负责老师。",{time:4000,shade:0.5});
        }else {
          // bool 判断 触发的是取消还是确认按钮
            this.major_name2 = bool ? this.major_temp2 : this.major_name2;
            this.major2_id = bool ? this.major2_id_temp : this.major2_id;
            $("#save").show();
            this.majorVisible2 = false
        }
      },
        saveChange:function(){
        $.post("<?php echo url('My/changeStudentMajor'); ?>",{id:'<?php echo $apply['id']; ?>',bktype:this.bktype_name,bktype_id:this.bktype_id,coursetype_name:this.coursetype_name,coursetype_id:this.coursetype_id,major:this.major_name,major_id:this.major_id,major2:this.major_name2,major2_id:this.major2_id,isadjust:this.isAdjust_name},function(data){
            layer.msg(data.msg,{time:2000,shade:0.5},function(){
                $("#save").hide();
            })
        });
        },
        //弹出是否调剂
        showIsAdjust: function() {
            this.isAdjustVisible = true

        },
        isAdjustChange: function(picker, values) {
            if (picker.getSlotValue(0)) {
                this.isAdjust_temp = picker.getSlotValue(0).name
            }
        },
        selectIsAdjust: function(bool) {
            // bool 判断 触发的是取消还是确认按钮
            this.isAdjust_name = bool ? this.isAdjust_temp : this.isAdjust_name;
            $("#save").css("display","block");
            this.isAdjustVisible = false
        },
    },
    computed:{
        bktype_name_s(){
            var value = "";
            $.ajax({
                url:this.query + "/Examtypes/first_name",
                data:{},
                async:false,
                success(data){
                    value = data
                }
            })
            return value;
        },
        bktype_id_s(){
            var value = "";
            $.ajax({
                url:this.query + "/Examtypes/first_id",
                data:{},
                async:false,
                success(data){
                    value = data
                }
            })
            return value;
        },
        // 报考类型列表
        bktype_list(){
            datas = 	[{flex:1,values:[]}];
            // 	values:[;
            $.ajax({
                url:this.query + "/Examtypes/index",
                data:{},
                async:false,
                success(data){
                    datas[0].values = data
                }
            })
            // console.log(datas);
            return datas;
        },
        //专业大类
        coursetype_name_s(){
            var value = "";
            $.ajax({
                type:"post",
                url:this.query + "/Courses2/Course_type_name",
                data:{'examtype_id':this.bktype_id},
                async:false,
                success(data){
                    value = data
                }
            })
            return value;
        },
        coursetype_id_s(){
            var value = "";
            $.ajax({
                type:"post",
                type:"post",
                url:this.query + "/Courses2/Course_type_id",
                data:{'examtype_id':this.bktype_id},
                async:false,
                success(data){
                    value = data
                }
            })
            return value;
        },
        coursetype_list(){
            datas = 	[{flex:1,values:[]}];
            console.log(this.bktype_id);
            $.ajax({
                type:"post",
                url:this.query + "/Courses2/Course_type",
                data:{'examtype_id':this.bktype_id},
                async:false,
                success(data){
                    datas[0].values = data
                }
            })
            return datas;
        },
        //专业
        major_temp_s(){
        var value = "";
        $.ajax({
            type:"post",
          url:this.query + "/Courses2/first",
          data:{coursetype_id:this.coursetype_id},
          async:false,
          success(data){
            value = data
          }
        })
        return value;
      },
        major_temp2_s(){
        var value = "";
        $.ajax({
            type:"post",
          url:this.query + "/Courses2/first",
          data:{},
          async:false,
          success(data){
            value = data.name
          }
        })
        // console.log(value.name);
        return value;
      },
        coursetype_list(){
            datas = 	[{flex:1,values:[]}];
            // 	values:[;
            $.ajax({
                type:"post",
                url:this.query + "/Courses2/Course_type",
                data:{'examtype_id':this.bktype_id},
                async:false,
                success(data){
                    datas[0].values = data
                }
            })
            // console.log(datas);
            return datas;
        },
        major_list(){
        datas = 	[{flex:1,values:[]}];
        // 	values:[;
        $.ajax({
          type:"post",
          url:this.query + "/Courses2/index",
          data:{coursetype_id:this.coursetype_id,grade:this.grade_name},
          async:false,
          success(data){
            datas[0].values = data
          }
        })
        // console.log(datas);
        return datas;
      },
        major_list2(){
        datas = 	[{flex:1,values:[]}];
        // 	values:[;
        $.ajax({
          type:'post',
          url:this.query + "/Courses2/index",
          data:{coursetype_id:this.coursetype_id,grade:this.grade_name},
          async:false,
          success(data){
            datas[0].values = data
          }
        })
        // console.log(datas);
        return datas;
      },
    }
  });

    //审核通过
    $("#classAddStudent2").on("click",function(){
      var s = $(this);
      var data = {
        id: '<?php echo $apply['id']; ?>',
        teacher : '<?php echo $teacher['name']; ?>',
        teacher_id : '<?php echo $teacher['id']; ?>',
        teacher_comment: ""
      }
      layer.msg('你确定要通过该审核吗？', {
        time: 200000, //20s后自动关闭
        btn: ['确定', '取消'],
        shade:0.5,
        yes:function(){
          $.post("<?php echo url('My/classAddStudent2'); ?>",data, function (data) {
            layer.closeAll();
            top.layer.msg(data.msg, {time: 2000,shade:0.5}, function () {
              if (data.url) {
                window.location.href = data.url+"?id=<?php echo $user['id']; ?>";
              }
            });
          })
        }
      });
    });



    });
</script>
</body>
</html>